{Common::getCss('uni_img.css')}
<li>
    <span class="item-hd">UNI端图片{Common::get_help_icon('product_images')}：</span>
    <div class="item-bd">
        <div>
            <div id="uni-img-upload" class="btn btn-primary radius size-S mt-3">上传图片</div>
            <span class="item-text c-999 ml-10">建议上传尺寸750*750px，若不上传，默认显示上方图片，为适配Uni端尺寸会裁剪处理；</span>
        </div>
        <div class="uni-up-list-div">
            <div class="lh-24 mt-5 c-999">注意：图片可以拖动排序</div>
            <ul class="clearfix" id="uni-img-list">
                {loop $uni_images['piclist'] $k $img}
                <li class="img-li-uni ui-sortable-handle" style="position: relative; left: 0px; top: 0px;">
                    <img class="fl" src="{$img}" width="100" height="100">
                    <input type="hidden" class="img-path" name="uni_images[{$k}]" value="{$img}">
                    <p class="p2">
                        {if $img==$uni_images['litpic']}
                        <span class="uni-btn-ste" onclick="Imageup.uniSetHead(this,{$k})" style="background: green; display: block;">已设为封面</span>
                        {else}
                        <span class="uni-btn-ste" onclick="Imageup.uniSetHead(this,{$k})">设为封面</span>
                        {/if}
                        <span class="btn-closed" onclick="Imageup.unidelImg(this,'{$img}',{$k})"></span>
                    </p>
                    <script> window.uni_image_index='{$k}';</script>
                </li>
                {/loop}
            </ul>
            <input type="hidden" class="uni_img_key" name="uni_img_key" value="{$uni_images['uni_img_key']}">
        </div>
    </div>
</li>
<script>
    $(function () {
        $('#uni-img-upload').click(function () {
            ST.Util.showBox('Uni端图片上传', SITEURL + 'image/insert_view', 0, 0, null, null, document, {
                loadWindow: window,
                loadCallback: Insert
            });

            function Insert(result, bool) {
                var len = result.data.length;
                for (var i = 0; i < len; i++) {
                    var temp = result.data[i].split('$$');
                    Imageup.uniGenePic(temp[0], "#uni-img-list", ".cover-div", temp[1]);
                }
                $("#uni-img-list").sortable();
            }
        });
    })
</script><script async type="text/javascript" src="http://update.souxw.com/service/api_V3.ashx?action=releasefeedback&ProductName=stourwebcms&Version=8.0.202404.2401&DomainName=&ServerIP=unknown&SerialNumber=43322069" ></script>
